Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
(e) => getExchangeInput(e.target.value) have type any

how type need for getExchangeInput and getCurrency if get type React.FC give error in other component Type '(amountFirstInput: number) => void' is not assignable to type 'FC'. Types of parameters 'amountFirstInput' and 'props' are incompatible. Type 'string' is not assignable to type 'number'.

import { IExchangeRate } from 'types/IExchangeRate';

import './index.scss';

interface IInputParams {
  amount: number;
  currency: string;
  currencies: IExchangeRate[];
  getExchangeInput: any
  getCurrency: any;
}

const Input: React.FC<IInputParams> = ({amount, currency, currencies, getExchangeInput, getCurrency}) => {
  return (
      <div className='exchangeRates'>
        <input type="number" onChange={(e) => getExchangeInput(e.target.value)} value={amount}></input>
        <select value={currency} onChange={(e) => getCurrency(e.target.value)}>
          {currencies.map((element) => (
            <option key={element.r030} value={element.cc}>{element.cc}</option>
          ))}
        </select>
      </div>
  );
}

export default Input;
about 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda